﻿/*------------------------------------------------
// File Description: BinningCurrent DataBase Entity
// Author:			 汪亮
// Create Time:		 2020-06-07 23:45:00
//------------------------------------------------*/

using System;
using System.Data.Entity;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace IOA.MES.DataAccess.Entity
{
    /// <summary>
    /// 电流档
    /// </summary>
    [Table(nameof(BinningCurrent))]
    public class BinningCurrent : BaseEntity
    {
        private string _levelName = string.Empty;

        #region Public Property

        ///<Summary>
        /// 规则ID
        ///</Summary>
        public int SchemaId { get; set; }

        ///<Summary>
        /// 功率档ID
        ///</Summary>
        public int PowerId { get; set; }

        ///<Summary>
        /// 档位名称
        ///</Summary>
        public string LevelName
        {
            get { return string.IsNullOrWhiteSpace(_levelName) ? string.Empty : _levelName; }
            set { _levelName = value; }
        }

        ///<Summary>
        /// 电流下限
        ///</Summary>
        public decimal CurrentMin { get; set; }

        ///<Summary>
        /// 电流上限
        ///</Summary>
        public decimal CurrentMax { get; set; }
        #endregion
    }

    public partial class MESContext
    {
        /// <summary>
        /// 电流档
        /// </summary>
        public virtual DbSet<BinningCurrent> BinningCurrents { get; set; }
    }
}